import http from "@/utils/http";

/**
 * 添加收货地址
 * @returns 
 */
export const postMemberAddress = (data)=>{
    return http({
        url:'/member/address',
        method:"post",
        data
    })
}

/**
 * 获取收货地址列表
 * 
 */
export const getMemberAddress = ()=>{
    return http({
        url:'/member/address',
    })
}

/**
 * 删除  
 */
export const delMemberAddress = (id)=>{
    return http({
        url:'/member/address/'+id,
        method:'delete'
    })
}

/**
 * 根据id地址获取详情  /member/address/{id}
 */
export const getMemberAddressDetail = (id)=>{
    return http({
        url:'/member/address/'+id,
    })
}

/**
 * 更新地址  /member/address/{id}
 */
export const updateMemberAddress = (id,data)=>{
    return http({
        url:'/member/address/'+id,
        method:'put',
        data
    })
}